Combat mechanics (Origins)
} |name= Combat Mechanics |icon= Ico_Gears.png }} Combat mechanics comprise the technical details relevant to combat. Armor A numerical value that is commonly a property of armor and shields and serves as an integer reduction in physical damage sustained from a successful attack. Armor Penetration Armor penetration reduces your opponent's armor. It acts in direct opposition to the defender's armor. For example, if you have 3 armor penetration and your opponent has 10 armor, your attacks damage the opponent as if it had 7 armor. Armor penetration is capped at 41 points. Armor penetration can be enhanced with Telekinetic Weapons, two-handed strength, stone aura + renewed assault, pulverizing blows + quake, aim + master archer, equipment and Cunning. Each point of cunning adds approximately 0.14 armor penetration, the exact formula is: AP = (Cunning - 10) / 7 Attack A numerical value that is used to determine whether a physical attack succeeds in impacting, though not necessarily damaging, an enemy. AttackValue = 60 + 0.5 * {(Strength - 10) + (Dexterity - 10)} + AttackBonuses Equipment, skills, spells and talents provide bonuses to Attack. Attack Roll For most attacks (including activated Talents), an attack roll against the target's Defense is performed. If the attack roll is successful, the attack connects. When the attacker's Attack value is the same as the defender's Defense value, the hit probability is 54%. Each point of attack increases this by one point (up to 100%), each point of defense decreases this probability by one point (at 0, attacks with attack rolls will always miss). E.g., at 100 Attack: Note: The '''Defense' value against ranged attacks includes a missile deflection modifier (e.g. from carrying a shield) that is added to the normal Defense value.'' Attack Speed Melee Attacks The rate at which automatic attacks (not activated Talents) can be performed by a creature is determined by the Weapon Style used and the Weapon itself. It can be increased with Spells: Haste, items: swift salve and Talents: Momentum, blessing of the fade and blood thirst. The duration of a normal attack (no activated Talent used) is calculated as follows: AttackDuration = (BaseTiming + WeaponSpeedMod) * CharacterSpeedModifier BaseTiming *Dual-Weapons (each weapon is used in turn): 1.5s *Weapon and Shield: 2.0s *Two-handed: 2.5s WeaponSpeedMod This modifier is the Speed Modifier listed on the Weapons page. *Note: when dual-wielding with different speeds, the timing is averaged and will alternate between main-hand and off-hand weapons every hit. I.e., If you wield Starfang (-0.1) and Rose's Thorn (-0.5), you will make an attack every (1.5-0.1)+(1.5-0.5)/2 = 1.2 seconds. CharacterSpeedModifier This value is normally 1.0. It is modified by the following: *Haste: -0.25 *Momentum: -0.3 *Precise Striking: +0.1 *Swift Salve: -0.2 *Blood Thirst: -0.2 *Blessing of the Fade: -0.2 Due a bug in core_h.nss, the CharacterSpeedModifier resets to 1.0, if it less than 0.5 (e.g. by having Haste and Momentum activated). *BUG* Combining Blessing of the Fade and Momentum breaks the 0.5 cap for some people, but not for others. Ranged Attacks Duration of automatic attacks (most activated talents take substantially more time): AttackDuration = BaseDuration + AimTime BaseDuration *If (wearing Heavy Chest Armor and not Master Archer) or wearing Massive Chest Armor: 2.8s *Else: 1.6s It is not affected either by Haste or Swift Salve, or by any Aim Speed modifiers. For non-party members, a penalty of 0.7s is added. AimTime The basic Aim time is 0.2s for Shortbows, 0.3s for Longbow and 0.8s for Crossbows. It can be reduced down to a cap of 0s. Check the Aim Speed Reference Sheet for details on items, talents and spells modifying Aim Time. Staff Attack Speed *Staff attack speed is unaffected by chest armor type. *Staff attack speed is normally affected by aim speed modifiers, such as property on items or Haste spell. *Staff attack speed fluctuates by 0.1-0.3s per auto-attack. Minimum length of staff attack animation is 1.4~1.7s. Backstab A backstab is a type of critical hit, with prerequisites to perform. Backstab vs Critical The damage calculation for the critical hit and the backstab are identical; the primary difference between the two being that a critical hit has a percentage chance attached to every weapon (regardless of type, etc), whereas as a backstab requires a melee weapon (among other things). The specifics of this are discussed below. Please also note that, while Backstabs do "critical damage", they are not considered by the game to be a "critical hit". The ramification of this is that a Backstab will not shatter a frozen or petrified target. Rogues wishing to do so, without using a talent, may wish to stealth and then attack with any weapon. A hit will generate an automatic critical hit and shatter the target. Implementation The code below was found in Dragon Age scripts combat_h_nns, in relation to backstabbing with a bow/arrow. Combat_CheckBackstab is *only* called here: if (nAttackType ATTACK_TYPE_MELEE) { // If we are backstabbing, we can change the result here if it was a crit. Abilities never bs (anim priority) if (nAbility 0 && Combat_CheckBackstab (oAttacker, oTarget, oWeapon, fFlanking)) { nRet = COMBAT_RESULT_BACKSTAB; } } Interpretation of the code leads to the following assumptions: *The damage effect of critical hits and backstabs is the same; however, backstabs can get some extra damage via exploit weakness + shadow striking and add bleeding damage via lacerate. *Backstabs can recover stamina after killing a target via feast of the fallen.Critical hits can only do this as well if they have the warrior ability deathblow. *If you hit then there is a percentage chance of critical hit (which is 100% if you are in stealth, make a flanking attack or attack a paralyzed/stunned opponent while having the passive talent coup de grace) This can happen with both melee and ranged weapons. *Backstab damage calculation is done separately for each weapon though the animation shows you hit primarily with the main-hand weapon. This is noticeable if you equip a high damage main hand weapon and a low damage off-hand weapon. You will see the damage numbers vary a lot. *If you hit the target and all of the following is true then a backstab will occur: **The attacker uses a melee weapon **The attack is a normal attack and not an activated ability (i.e. one can't backstab with Deadly Strike), unless the ability is scripted to cause backstabs. (e.g. Flicker) **The attacker is a rogue **The attacker is humanoid **The target is not immune to critical hits **Dual Striking mode is not enabled **The attacker is flanking the enemy or the target is stunned/paralyzed and the attacker has Coup de Grace or the attacker is coming out of stealth. Summary *A bow cannot be used to backstab but can cause a critical hit. *Staves cannot be used to backstab and cannot cause a critical hit. *Any melee weapon can be used to backstab. Damage Weapon Damage Damage caused by an attack with a Weapon is calculated as follows: *Normal Hit: Damage = BaseWeaponDmg + AttributeBasedDmg + CharacterDmgBonus + OnHitDamage - ArmorDmgReduction *Backstab / Critical Hit: Damage = CriticalDamageModifier * (BaseWeaponDmg + AttributeBasedDmg) + CharacterDmgBonus + OnHitDmg - ArmorDmgReduction Note: If the calculated '''Damage' value is less than 1.0, it is set 1.0.'' BaseWeaponDmg The base weapon damage is listed on the Weapons page. The damage range listed there is multiplied by (0.9 + 0.1 * WeaponRank). AttributeBasedDmg One or two character attributes are used to determine AttributeBasedDmg (listed on the Weapons page). Each weapon type has an Attribute Modifier (listed on the Weapons page as well), which influences the Damage Bonus based on attributes. *One character attribute used: AttributeBasedDmg = Value - 10 * Attribute Modifier * Style Modifier *Two character attributes used: AttributeBasedDmg = 0.5 * Value1 + Value2 - 20 * Attribute Modifier * Style Modifier Weapon Style Modifier: *Single Weapon / Sword and Shield / Two-Handed: range 50-75%, average 0.625 *Dual Wielding: range 25%-50%, average 0.375 main hand; 0.125 off hand (full 0.375 multiplier with Dual-Weapon Training) CharacterDmgBonus This damage bonus is based on a special character property (Property 39, DamageBonus), modified by the following: *Level Damage Bonus: 0.1 for mages, 0.2 for rogues and 0.4 for warriors *Specialization damage bonus: duelist and legionnaire scout *Activated talent damage bonus: slam + killing blow (only if pulverizing blows is sustained) *Passive talent damage bonus: aura of might, bravery, exploit weakness, supernatural aura (only if stone aura is sustained) and master archer (only if aim is sustained) *Sustained talent damage bonus: Aim, Berserk, Blood Frenzy, Combat Magic, Indomitable, Powerful Swings, Song of Courage, The Tainted Blade, Pulverizing Blows, Stone Aura and Accuracy. * properties on weapons (if dual wielding, these will effectively apply to both weapons). *This damage bonus is capped at . * abilities debuffing enemies rather than buffing the character (e. g., Mark of Death and Weak Points,) are not affected by this cap. Critical Hit / Backstab BaseWeaponDmg and AttributeBasedDmg damage is multiplied by a CriticalDamageModifier, which is 1.5. The Modifier can be increased with gear that grants a bonus to the property Critical Range (e. g., Red Jenny Seekers), which is capped at 200%, according to the following formula: CriticalDamageModifier = COMBAT_CRITICAL_DAMAGE_MODIFIER + PROPERTY_ATTRIBUTE_CRITICAL_RANGE / 100.0 The maximum total +crit/backstab dmg that can be achieved on a character is 350%, 150% base and +200% max from gear. OnHitDmg When a weapon hits, a number of OnHit properties can be triggered: Damage from Runes, Damage from Enchantment Spells (Flaming Weapons, Frost Weapons) and Poisons. These OnHit properties are not triggered when activated talents are used. As of Patch 1.04, when a Dual-Wielder back-stabs, Runes and other OnHit properties for the off-hand weapon are properly registering for each off-hand strike and the main-hand OnHit properties are no longer triggered for hits from both weapons. ArmorDmgReduction Armor can reduce damage dealt by melee weapons and ranged weapons (except for Staves, which have special handling in the game engine). Other physical damage (e.g. from an explosion of Walking Bomb) is not reduced. An effective armor value is determined for each hit: ArmorDmgReduction = (0.7 + 0.3 * value between 0 and 1) * Value of Target - Penetration of Attacker If ArmorDmgReduction is less than 0, it is set to 0. Thus, Armor Penetration can at most reduce the damage reduction effect of armor to 0, it cannot result in a damage bonus. Elemental Damage Any kind of Elemental Damage (cold, electricity, fire, nature, spirit), e.g. from Spells, Runes, Poisons, Bombs, and Staves dealing Elemental Damage, is modified as follows: Damage = BaseValue * AttackerDamageModifier * TargetResistanceModifier Note that certain creatures are immune to some types of elemental damage. AttackerDamageModifier There is a separate modifier for each type of elemental damage. This modifier is normally 1.0. It can be increased up to a cap of 1.3 with items that have a property, e.g. Spirit Hands and Elementalist's Grasp. properties are not capped at . The new cap is .}} TargetResistanceModifier The target can have up to 75% Elemental Resistance (this would correspond to a TargetResistanceMultiplier of 0.25). Elemental resistance can be negative as well (due to the target having an elemental damage weakness or Spells that lower resistance: Vulnerability Hex, Affliction Hex), adding an additional amount of damage. Negative Resistance is capped at -100%. Defense A special creature attribute that influences the likelihood to successfully evade an attack. At very high levels, a creature can successfully evade almost all attacks. DefenseValue = 40 + (Dexterity - 10) + DefenseBonuses Many Items, Spells and Talents provide bonuses to defense. Note: '''Defense' allows to completely evade an attack (including any negative effects the attack might have), Armor reduces the damage from a successful attack.'' Freezing See Also: Resistance Checks Certain spells, namely Winter's Grasp, Cone of Cold, Blizzard, and Hand of Winter can temporarily incapacitate a target if effective. [[Combat Mechanics|'Resistance Check']] :Freezing is resisted by a successful physical resistance check vs. the caster's spellpower. Duration :Freeze duration is determined by the base freeze duration modified by target rank. Elemental Immunity See Also: Immunities Some monsters are completely immune to certain damage types. This immunity can not be bypassed with Vulnerability Hexes. Elemental Resistance See Also: Resistances Elemental resistance is shorthand for the four resistances for the primal elemental magics. Elemental Resistance determines the character's ability to withstand various elemental effects, specifically primal magic (fire, ice, lightning, nature, spirit). A high elemental resistance (fire, ice, lightning, nature, spirit resistance) allows a character to limit the damage of the elemental attack. Examples include: withstanding Flame Blast, Winter's Grasp, Stonefist, Shock, etc. Health Health is the amount of total damage a character/enemy can take before falling unconscious. The red meter outlining the left side of the character portrait tracks this statistic (percentage left vs. total). Health is increased by constitution, 5 health points per 1 level constitution. Knockdown A combat effect generated by many talents that incapacitates a target for a short duration. [[Combat Mechanics|'Resistance Check']] :Knockdowns are resisted by a successful physical resistance check vs. the caster's "attack attribute". This is considered to be either the caster's spellpower or strength modifier, depending on whether the ability used is a spell or a talent, respectively. Pseudocode - Duration Duration (s) = (0.0 <= Decimal Value < 1.0) Mental Resistance See Also: Resistance Checks, Spells that Check against Mental Resistance and Attacks that Check against Mental Resistance Mental Resistance determines the character's ability to withstand various special effects, specifically combat (Bard songs) or magic effects which affect the mind of the character. A high mental resistance allows a character to either completely shrug off the effect, or take a limited negative buff instead. Examples: withstanding Captivating Song, Blood Control, Horror, etc. Mental Resistance is different from Spell Resistance Missile Deflection A property most often seen on shields that allows for a chance to nullify an incoming ranged, physical attack. Pseudocode - Deflection Check CheckSuccess = (0.0 <= Decimal Value < 1.0) <= (Missile Deflection / 100.0) Movement Speed The speed at which a creature is able to move. Haste increases movement speed by 30% Swift salve increases movement speed by 20% Physical Resistance See Also: Resistance Checks and Spells that Check against Physical Resistance and Attacks that Check against Physical Resistance Physical Resistance determines the character's ability to withstand various special effects, specifically combat or magic effects which affect the body of the character. A high physical resistance allows a character to either completely shrug off the effect, or take a limited negative buff instead. Examples include: Withstanding Knockdown, Earthquake, Paralyze. Regeneration Stamina and mana regenerate at different rates depending on attributes and whether the creature is engaged in combat. Refer to Regeneration article for additional information. Resistance Checks See also, Resistances Physical and mental combat effects have a chance to be resisted by a target as modified by various factors. Pseudocode - Resistance Check ResistanceChance = Resistance Score - Attacking Attribute + (Rank * Rank Modifier) + (Level * 5 - ((Difference Between Level and Level) * 5.0) If ResistanceChance >= Maximum Resistance Chance ResistanceChance = Maximum Resistance Chance CheckSuccess = (0.0 <= Decimal Value < 100.0) <= ResistanceChance * Maximum Resistance Chance: 100.0 (usually) Shattering When frozen or petrified by a spell a target can possibly be shattered by a critical hit (or by the effect of specific other spells), effectively killing it instantly. Pseudocode - Shatter Check If Target is not a Boss or Plot Character and (not a Party Member unless (Difficulty >= Hard)) If Target is a Special Rank If Difficulty = Easy ShatterChance = 0.3 ElseIf Difficulty = Normal ShatterChance = 0.2 ElseIf Difficulty = Hard ShatterChance = 0.1 ElseIf Difficulty = Nightmare ShatterChance = 0.05 Else ShatterChance = 1.0 CheckSuccess = (0.0 <= Decimal Value < 1.0) <= ShatterChance Spell Resistance See also Resistances Spell Resistance determines the percentage chance to completely ignore a hostile magical spell attack. Non-spell elemental attacks ignore this attribute as they are not spells. Spells cast by party members (i.e. friendly fire) are not normally affected by Spell Resistance. In nightmare mode, mobs have a base spell resistance of 10%. In easy mode, -10%. Threat See Threat Threat determines how enemies attack your party and is critical to take account of for combat strategy Category:Gameplay Category:Game rules Category:Game mechanics Category:Guides